package org.jordens.jdbcspy.sync;

/**
 * A DataStream is essentially a data source that pushes out modifications to
 * a set of registered DataUpdaters.
 *
 * @author Adam Jordens
 */
public interface DataStreamer
{
    /**
     * @param dataUpdater
     */
    void register(DataUpdater dataUpdater);

    /**
     * @param dataUpdater
     */
    void unregister(DataUpdater dataUpdater);

    /**
     * Notify currently registered DataUpdaters
     */
    void notifyDataUpdaters();

    /**
     * Start the publishing mechanism of this DataStreamer.
     *
     * Events will be published to subscribed DataUpdaters periodically.
     */
    void start();
}
